{# vim: set et ts=8 sts=4 sw=4 ai ft=jinja.html: #}
{% extends "settings.html" %}
{% block content %}
{#
#}
<div class="card m-auto m-lg-20" id="application_preferences">
<div class="mw-full">
<form action="{{ url_for("admin") }}" method="POST">
<h2 class="card-title">Application Preferences</h2>
{##}
  <div class="form-group">
    <label for="site_name" class="required">Site Name</label>
    <input name="site_name" type="text" placeholder="An Otter Wiki" class="form-control" id="site_name" value="{{ config.SITE_NAME or "" }}">
    <div class="form-text">
      The name of the site, displayed on the top left of the page and in the subject of all emails.
    </div>
  </div>
{##}
  <div class="form-group">
    <label for="site_description">Site Description</label>
    <input name="site_description" type="text" placeholder="A minimalistic wiki powered by python, markdown and git." class="form-control" id="site_description" value="{{ config.SITE_DESCRIPTION or "" }}">
    <div class="form-text">
      The default description used in <code>&lt;meta&gt;</code> tags.
    </div>
  </div>
{##}
  <div class="form-group">
      <label for="site-logo">Site Logo</label>{# using site-logo here is not a typo, chrome complained about name/id mismatches #}
    <input name="site_logo" type="text" placeholder="/static/img/otterhead.png" class="form-control" id="site-logo" value="{{ config.SITE_LOGO or "" }}">
    <div class="form-text">
        Configure via an url to the image that is displayed in the navbar on top of every page.
        This can be an attachment, e.g. <code>logo.png</code> attached to <code>Home</code> can be used as <code>/Home/a/logo.png</code>
    </div>
  </div>
{##}
  <div class="form-group">
      <label for="site-lang">Site Language</label>
    <input name="site_lang" type="text" placeholder="/static/img/otterhead.png" class="form-control" id="site-lang" value="{{ config.SITE_LANG or "" }}">
    <div class="form-text">
        Configures the <code>lang</code> attribute of the <code>&lt;html&gt;</code> lang used in the wiki. For example, <code>en</code> specifies English, but <code>en-GB</code> and <code>en-US</code> more precisely specify British English and American English, respectively.
        <em>Note: This is not to be confused with configuring the lange and localization of the application. This is not yet supported.</em>
    </div>
  </div>
{##}
    <div class="form-group">
        <label for="robots_txt">Robot Crawlers</label>
        <select class="form-control w-md-400" id="robots_txt" name="robots_txt">
{% for mode in [("allow", "Allow"),("disallow","Disallow")] %}
            <option value="{{mode[0]}}"{%if config.ROBOTS_TXT == mode[0] %} selected="selected"{%endif%}>{{mode[1]}}</option>
{% endfor %}
        </select>
        <div class="form-text">
            Configure how the wiki indicates to visiting robots whether they are allowed to crawl the content.
        </div>
    </div>
{##}
  <div class="form-group">
    <label for="site_icon">Site Icon (favicon)</label>
    <input name="site_icon" type="text" placeholder="/static/img/otter-favicon2.png" class="form-control" id="site_icon" value="{{ config.SITE_ICON or "" }}">
    <div class="form-text">
        Configure via an url to the image that is displayed as favicon (tab icon, URL icon, bookmark icon).
        This can be an attachment, e.g. <code>favicon-32x32.png</code> attached to <code>Home</code> can be used as <code>/Home/a/favicon-32x32.png</code>
    </div>
  </div>
{##}
  <div class="form-group">
    <div class="custom-checkbox">
      <input {%if config.HIDE_LOGO %}checked{% endif %} type="checkbox" id="hide_logo" name="hide_logo" value="True">
      <label for="hide_logo">Hide the logo of An Otter Wiki in the sidebar.</label>
    </div>
    <div class="form-text">
        An Otter Wiki logo will not be shown.
    </div>
  </div>
{##}
  <div class="mt-10">
    <input class="btn btn-primary" name="update_preferences" type="submit" value="Save Preferences">
  </div>
</form>
</div>
</div>{# card #}

{% endblock %}
